// ==UserScript==
// @match http://*.co.il/*
// @match http://*.themarker.com/*
// @author Yonatan Karny http://www.facebook.com/yonatan.karny
// @description Stops annoying popups on click on israeli media sites. 
// ==/UserScript==


var vals = [];
for (var i=0, currSrc, val; i<document.scripts.length; i++) {
	currSrc = document.scripts[i].getAttribute('src');
	if (!!currSrc) {
		val = currSrc.split('http://live.sekindo.com/live/liveView.php?s=')[1];
		if (!!val) {
			//console.log('stopping popup for val: ' + val);
			vals[val.split('&')[0]] = true;
		}
	}
}

var script = 'if (typeof(popupP) === "function") { popupP = function() {}; };';
for (var curr in vals) {
	if (vals.hasOwnProperty(curr)) {
		script += ' gCookie_'+curr+' = "yes";';
	}
}

var ele = document.createElement('script');
ele.innerHTML = script;
document.head.appendChild(ele);